#include<stdio.h>

// 每一个宏，只有一个比特位是1，彼此直接不会重叠
#define ONE (1<<0) // 等价于0x01
#define TWO (1<<1) // 等价于0x02
#define THREE (1<<2)
#define FOUR (1<<3) 


void show(int flag)
{
    if(flag & ONE)
        printf("one\n");
    if(flag & TWO)
        printf("two\n");
    if(flag & THREE)
        printf("three\n");
    if(flag & FOUR)
        printf("fout\n");
}

int main()
{
    // 通过与的方式，利用比特位传递选项，这样32位会有32个选项
    show(ONE);
    printf("-----------------------\n");
    show(ONE | TWO);
    printf("-----------------------\n");
    show(ONE | TWO | THREE);
    printf("-----------------------\n");
    show(ONE | TWO | THREE | FOUR);
    
    
    return 0;
}
